      <div class="templatemo-content-wrapper">
        <div class="templatemo-content">
          <ol class="breadcrumb">
            <li><a href="<?=site_url()?>/advise/index">建议管理</a></li>
            <li class="active">回复建议</li>
          </ol>
          <div class="row margin-bottom-30">
            <div class="col-md-12">
              <ul class="nav nav-pills">
                <li class="active"><a href="<?=site_url()?>/advise/index">返回建议列表</a></li>
              </ul>          
            </div>
          </div> 
          <div class="row">
            <div class="col-md-12">
              <div class="table-responsive">
                <h4 class="margin-bottom-15">回复建议</h4>
                 <form role="form" id="templatemo-preferences-form" onsubmit="return false;">
                 	<input type="hidden" id="id" value="<?=$advise['id']?>" />
                <div class="row">
                  <div class="col-md-12 margin-bottom-15">
                    <label for="firstName" class="control-label">回复内容</label>
                    <textarea  class="form-control" id="content" rows="8" cols="25" style="resize: none;"><?=$advise['reply']?></textarea>            
                  </div>
	              </div>
	              <div class="row templatemo-form-buttons">
	                <div class="col-md-12">
	                  <button type="submit" class="btn btn-primary" id="submit_btn">提交</button>
	                </div>
                </div>
                </form>
              </div>
            </div>
          </div>
        </div>
      </div>
<script>
	$(document).ready(function() {
		$("#submit_btn").click(function() {
			var id = $("#id").val();
			var content = $("#content").val();
			$.ajax({
				url : '<?php echo site_url('advise/save')?>',
				type : "post",
				async : false,
				data : {
					'id':id,
					'content' : content
				},
				dataType : "json",
				success : function(data) {
					if(data.code)
					{
						alert(data.msg);
					}else{
						alert(data.msg);
					}
					
				}
			});
		});
	}); 
</script>